//
//  DynamicSignalLabel.h
//  Portable Traffic Signal Assistor
//
//  Created by Ding on 9/6/12.
//  Copyright (c) 2012 TTU. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "Signal.h"
#import "SignalPhase.h"
#import "TrafficSignalTimer.h"
#import "InterfacePoint.h"
//#import "InterfacePoint.h"

enum DynamicSignalLabelDirection{
    NORTHBOUND=0,
    SOUTHBOUND=1,
    EASTBOUND=2,
    WESTBOUND=3
    
} ;

@interface DynamicSignalLabel : UILabel

@property (nonatomic,retain) Signal *signal;
@property (nonatomic,retain) UILabel *signalNameLabel;
@property (nonatomic,retain) UILabel *activePhaseLabel;
@property (nonatomic,retain) UILabel *subActivePhaseLabel;
//@property (nonatomic,retain) UILabel *nextPhaseLabel;
@property (nonatomic) int timingRing1GraphPositionX;
@property (nonatomic) int timingRing2GraphPositionX;
@property (assign) int offsetPhaseTime;
@property (nonatomic,retain) NSMutableArray *labelList;
@property (nonatomic,retain) NSMutableArray *nbandLeftBeginPoints;
@property (nonatomic,retain) NSMutableArray *nbandrightBeginPoints;
@property (nonatomic,retain) NSMutableArray * nbandLeftEndPoints;
@property (nonatomic,retain) NSMutableArray * nbandRightEndPoints;
@property (nonatomic,retain) NSMutableArray *sbandLeftBeginPoints;
@property (nonatomic,retain) NSMutableArray *sbandrightBeginPoints;
@property (nonatomic,retain) NSMutableArray * sbandLeftEndPoints;
@property (nonatomic,retain) NSMutableArray * sbandRightEndPoints;
@property (nonatomic,retain) NSMutableArray *ebandLeftBeginPoints;
@property (nonatomic,retain) NSMutableArray *ebandrightBeginPoints;
@property (nonatomic,retain) NSMutableArray * ebandLeftEndPoints;
@property (nonatomic,retain) NSMutableArray * ebandRightEndPoints;
@property (nonatomic,retain) NSMutableArray *wbandLeftBeginPoints;
@property (nonatomic,retain) NSMutableArray *wbandrightBeginPoints;
@property (nonatomic,retain) NSMutableArray * wbandLeftEndPoints;
@property (nonatomic,retain) NSMutableArray * wbandRightEndPoints;
@property (nonatomic,retain) Link* beforeLink;
@property (nonatomic,retain) Link* afterLink;
@property (nonatomic) int direction;
@property (nonatomic) int labelsExtensionNumber;
@property (nonatomic,retain) TimingPattern *timingPattern;

- (id)initWithSignal:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier signal:(Signal*)signal direction:(int)direction labelsExtensionNumber:(int)labelsExtensionNumber;
- (void)drawSignalGraph;
- (void)updateActivePhaseLabelWithMasterTime:(int)masterTime;
- (void)updateLabelsExtensionNumber:(int)labelsExtenstionNumber;

@end
